
class AnimateSvc {
    constructor(dataManger) {
        this.dataManger = dataManger;
    }

    setAnimate(type, info) {
        if (!info.obj || (info.obj && info.obj.length == 0)) {
            return false;
        }

        let destObj = info.obj[0];
        let destGraph = this.dataManger.findGraph(destObj.gid);
        info['destGraph'] = destGraph;
        let pathObj = info.pathObj;
        if (pathObj) {
            let pathGraph = this.dataManger.findGraph(pathObj.gid);
            info['pathGraph'] = pathGraph;
        }

        let animateManager = this.dataManger.getAnimateManager();
        animateManager.setAnimate(type, info);
    }
}

export default { AnimateSvc }